home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_gtk / INCLUDE / GTK / GTKTABLE.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  4KB  |  144 lines

  1. /* GTK - The GIMP Toolkit
  2.  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Library General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.
  8.  *
  9.  * This library is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  12.  * Library General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Library General Public
  15.  * License along with this library; if not, write to the
  16.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.  * Boston, MA 02111-1307, USA.
  18.  */
  19.  
  20. /*
  21.  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
  22.  * file for a list of people on the GTK+ Team.  See the ChangeLog
  23.  * files for a list of changes.  These files are distributed with
  24.  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  25.  */
  26.  
  27. #ifndef __GTK_TABLE_H__
  28. #define __GTK_TABLE_H__
  29.  
  30.  
  31. #include <gdk/gdk.h>
  32. #include <gtk/gtkcontainer.h>
  33.  
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif /* __cplusplus */
  38.  
  39.  
  40. #define GTK_TYPE_TABLE            (gtk_table_get_type ())
  41. #define GTK_TABLE(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_TABLE, GtkTable))
  42. #define GTK_TABLE_CLASS(klass)        (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TABLE, GtkTableClass))
  43. #define GTK_IS_TABLE(obj)        (GTK_CHECK_TYPE ((obj), GTK_TYPE_TABLE))
  44. #define GTK_IS_TABLE_CLASS(klass)    (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TABLE))
  45.  
  46.  
  47. typedef struct _GtkTable    GtkTable;
  48. typedef struct _GtkTableClass    GtkTableClass;
  49. typedef struct _GtkTableChild    GtkTableChild;
  50. typedef struct _GtkTableRowCol    GtkTableRowCol;
  51.  
  52. struct _GtkTable
  53. {
  54.   GtkContainer container;
  55.   
  56.   GList *children;
  57.   GtkTableRowCol *rows;
  58.   GtkTableRowCol *cols;
  59.   guint16 nrows;
  60.   guint16 ncols;
  61.   guint16 column_spacing;
  62.   guint16 row_spacing;
  63.   guint homogeneous : 1;
  64. };
  65.  
  66. struct _GtkTableClass
  67. {
  68.   GtkContainerClass parent_class;
  69. };
  70.  
  71. struct _GtkTableChild
  72. {
  73.   GtkWidget *widget;
  74.   guint16 left_attach;
  75.   guint16 right_attach;
  76.   guint16 top_attach;
  77.   guint16 bottom_attach;
  78.   guint16 xpadding;
  79.   guint16 ypadding;
  80.   guint xexpand : 1;
  81.   guint yexpand : 1;
  82.   guint xshrink : 1;
  83.   guint yshrink : 1;
  84.   guint xfill : 1;
  85.   guint yfill : 1;
  86. };
  87.  
  88. struct _GtkTableRowCol
  89. {
  90.   guint16 requisition;
  91.   guint16 allocation;
  92.   guint16 spacing;
  93.   guint need_expand : 1;
  94.   guint need_shrink : 1;
  95.   guint expand : 1;
  96.   guint shrink : 1;
  97.   guint empty : 1;
  98. };
  99.  
  100.  
  101. GtkType       gtk_table_get_type          (void);
  102. GtkWidget* gtk_table_new          (guint        rows,
  103.                        guint        columns,
  104.                        gboolean        homogeneous);
  105. void       gtk_table_resize          (GtkTable           *table,
  106.                        guint            rows,
  107.                        guint            columns);
  108. void       gtk_table_attach          (GtkTable           *table,
  109.                        GtkWidget       *child,
  110.                        guint        left_attach,
  111.                        guint        right_attach,
  112.                        guint        top_attach,
  113.                        guint        bottom_attach,
  114.                        GtkAttachOptions xoptions,
  115.                        GtkAttachOptions yoptions,
  116.                        guint        xpadding,
  117.                        guint        ypadding);
  118. void       gtk_table_attach_defaults  (GtkTable           *table,
  119.                        GtkWidget       *widget,
  120.                        guint        left_attach,
  121.                        guint        right_attach,
  122.                        guint        top_attach,
  123.                        guint        bottom_attach);
  124. void       gtk_table_set_row_spacing  (GtkTable           *table,
  125.                        guint        row,
  126.                        guint        spacing);
  127. void       gtk_table_set_col_spacing  (GtkTable           *table,
  128.                        guint        column,
  129.                        guint        spacing);
  130. void       gtk_table_set_row_spacings (GtkTable           *table,
  131.                        guint        spacing);
  132. void       gtk_table_set_col_spacings (GtkTable           *table,
  133.                        guint        spacing);
  134. void       gtk_table_set_homogeneous  (GtkTable           *table,
  135.                        gboolean        homogeneous);
  136.  
  137.  
  138. #ifdef __cplusplus
  139. }
  140. #endif /* __cplusplus */
  141.  
  142.  
  143. #endif /* __GTK_TABLE_H__ */
  144.